<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::middleware('auth:api')->get('/user', function (Request $request) {
    return $request->user();
});

Route::group( ['namespace' => 'api'], function () {
    Route::post('outsourcedweight_inser','OutsourcedweightController@insert');
    Route::post('Outsourcedweight_deletedetail', 'OutsourcedweightController@deletedetail');
    Route::post('Outsourcedweight_updateweightnote', 'OutsourcedweightController@updateweightnote');
    Route::post('Outsourcedweight_ddde','OutsourcedweightController@ddde');
});

/*Route::group(['namespace' => 'api'], function(){
    // 控制器在 "App\Http\Controllers\Admin" 命名空间下
    Route::get('test','GrindingweightController@dsl');
});*/



/*Route::get('user', function () {
    return '<h1>路由</h1>';
})->name('profile');*/

/********************************************
时间：2018.10.24
作者：王素臣
用途：工序 称重 路由
备注：
 ********************************************/
Route::group( ['namespace' => 'api'], function () {
    Route::post('post_artdet_weight_data','ArtdetweightController@insert');
    Route::get('artdet_weight_select','ArtdetweightController@select');
});

Route::get('user/profile/{id}', function ($id) {
//    return route('profile');
//    $url = route('profile');
    $url = route('profile', ['id' => 1]);
    return $url;
})->name('profile');

//Route::get('admin/login', 'Admin\IndexController@login');